Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Function overloading</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Function_overloading"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Function_overloading rootpage-Function_overloading skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Function overloading</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1248332772">
/* start https://en.wikipedia.org/ */


.mw-parser-output .multiple-issues-text{width:95%;margin:0.2em 0}.mw-parser-output .multiple-issues-text>.mw-collapsible-content{margin-top:0.3em}.mw-parser-output .compact-ambox .ambox{border:none;border-collapse:collapse;background-color:transparent;margin:0 0 0 1.6em!important;padding:0!important;width:auto;display:block}body.mediawiki .mw-parser-output .compact-ambox .ambox.mbox-small-left{font-size:100%;width:auto;margin:0}.mw-parser-output .compact-ambox .ambox .mbox-text{padding:0!important;margin:0!important}.mw-parser-output .compact-ambox .ambox .mbox-text-span{display:list-item;line-height:1.5em;list-style-type:disc}body.skin-minerva .mw-parser-output .multiple-issues-text>.mw-collapsible-toggle,.mw-parser-output .compact-ambox .ambox .mbox-image,.mw-parser-output .compact-ambox .ambox .mbox-imageright,.mw-parser-output .compact-ambox .ambox .mbox-empty-cell,.mw-parser-output .compact-ambox .hide-when-compact{display:none}


/* end https://en.wikipedia.org/ */
</style>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="Instruction_overlapping" class="mw-redirect" title="Instruction overlapping">Instruction overlapping</a>, <a href="Overlay_(programming)" title="Overlay (programming)">Overlay (programming)</a>, or <a href="Method_overriding" title="Method overriding">Method overriding</a>.</div>
<style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1126788409">
/* start https://en.wikipedia.org/ */


.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1246091330">
/* start https://en.wikipedia.org/ */


.mw-parser-output .sidebar{width:22em;float:right;clear:right;margin:0.5em 0 1em 1em;background:var(--background-color-neutral-subtle,#f8f9fa);border:1px solid var(--border-color-base,#a2a9b1);padding:0.2em;text-align:center;line-height:1.4em;font-size:88%;border-collapse:collapse;display:table}body.skin-minerva .mw-parser-output .sidebar{display:table!important;float:right!important;margin:0.5em 0 1em 1em!important}.mw-parser-output .sidebar-subgroup{width:100%;margin:0;border-spacing:0}.mw-parser-output .sidebar-left{float:left;clear:left;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-none{float:none;clear:both;margin:0.5em 1em 1em 0}.mw-parser-output .sidebar-outer-title{padding:0 0.4em 0.2em;font-size:125%;line-height:1.2em;font-weight:bold}.mw-parser-output .sidebar-top-image{padding:0.4em}.mw-parser-output .sidebar-top-caption,.mw-parser-output .sidebar-pretitle-with-top-image,.mw-parser-output .sidebar-caption{padding:0.2em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-pretitle{padding:0.4em 0.4em 0;line-height:1.2em}.mw-parser-output .sidebar-title,.mw-parser-output .sidebar-title-with-pretitle{padding:0.2em 0.8em;font-size:145%;line-height:1.2em}.mw-parser-output .sidebar-title-with-pretitle{padding:0.1em 0.4em}.mw-parser-output .sidebar-image{padding:0.2em 0.4em 0.4em}.mw-parser-output .sidebar-heading{padding:0.1em 0.4em}.mw-parser-output .sidebar-content{padding:0 0.5em 0.4em}.mw-parser-output .sidebar-content-with-subgroup{padding:0.1em 0.4em 0.2em}.mw-parser-output .sidebar-above,.mw-parser-output .sidebar-below{padding:0.3em 0.8em;font-weight:bold}.mw-parser-output .sidebar-collapse .sidebar-above,.mw-parser-output .sidebar-collapse .sidebar-below{border-top:1px solid #aaa;border-bottom:1px solid #aaa}.mw-parser-output .sidebar-navbar{text-align:right;font-size:115%;padding:0 0.4em 0.4em}.mw-parser-output .sidebar-list-title{padding:0 0.4em;text-align:left;font-weight:bold;line-height:1.6em;font-size:105%}.mw-parser-output .sidebar-list-title-c{padding:0 0.4em;text-align:center;margin:0 3.3em}@media(max-width:640px){body.mediawiki .mw-parser-output .sidebar{width:100%!important;clear:both;float:none!important;margin-left:0!important;margin-right:0!important}}body.skin--responsive .mw-parser-output .sidebar a>img{max-width:none!important}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-night .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-list-title,html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle{background:transparent!important}html.skin-theme-clientpref-os .mw-parser-output .sidebar:not(.notheme) .sidebar-title-with-pretitle a{color:var(--color-progressive)!important}}@media print{body.ns-0 .mw-parser-output .sidebar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><table class="sidebar nomobile nowraplinks" style="width:auto"><tbody><tr><th class="sidebar-title"><a href="Polymorphism_(computer_science)" title="Polymorphism (computer science)">Polymorphism</a></th></tr><tr><th class="sidebar-heading" style="background-color:#ddf;font-size:110%">
<a href="Ad_hoc_polymorphism" title="Ad hoc polymorphism">Ad hoc polymorphism</a></th></tr><tr><td class="sidebar-content plainlist">
<ul>
<li><a href="Operator_overloading" title="Operator overloading">Operator overloading</a></li></ul></td>
</tr><tr><th class="sidebar-heading" style="background-color:#ddf;font-size:110%">
<a href="Parametric_polymorphism" title="Parametric polymorphism">Parametric polymorphism</a></th></tr><tr><td class="sidebar-content plainlist">
<ul><li><a href="Generic_function" title="Generic function">Generic function</a></li>
<li><a href="Generic_programming" title="Generic programming">Generic programming</a></li></ul></td>
</tr><tr><th class="sidebar-heading" style="background-color:#ddf;font-size:110%">
<a href="Subtyping" title="Subtyping">Subtyping</a></th></tr><tr><td class="sidebar-content plainlist">
<ul><li><a href="Virtual_function" title="Virtual function">Virtual function</a></li>
<li><a href="Dynamic_dispatch" title="Dynamic dispatch">Single and dynamic dispatch</a></li>
<li><a href="Double_dispatch" title="Double dispatch">Double dispatch</a></li>
<li><a href="Multiple_dispatch" title="Multiple dispatch">Multiple dispatch</a></li>
<li><a href="Predicate_dispatch" title="Predicate dispatch">Predicate dispatch</a></li></ul></td>
</tr><tr><td class="sidebar-navbar"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style></td></tr></tbody></table>
<p>In some <a href="Programming_language" title="Programming language">programming languages</a>, <b>function overloading</b> or <b>method overloading</b> is the ability to create multiple <a href="Subprogram" class="mw-redirect" title="Subprogram">functions</a> of the same name with different implementations. Calls to an overloaded function will run a specific implementation of that function appropriate to the context of the call, allowing one function call to perform different tasks depending on context.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Basic_definition">Basic definition</h2></div>
<p>For example, <style data-mw-deduplicate="TemplateStyles:r886049734">
/* start https://en.wikipedia.org/ */


.mw-parser-output .monospaced{font-family:monospace,monospace}


/* end https://en.wikipedia.org/ */
</style><span class="monospaced">doTask()</span> and <span class="nowrap"><span class="monospaced">doTask(object o)</span></span> are overloaded functions. To call the latter, an <a href="Object_(computer_science)" title="Object (computer science)">object</a> must be passed as a <a href="Parameter_(computer_science)" class="mw-redirect" title="Parameter (computer science)">parameter</a>, whereas the former does not require a parameter, and is called with an empty parameter field. A common error would be to assign a default value to the object in the second function, which would result in an <i>ambiguous call</i> error, as the <a href="Compiler" title="Compiler">compiler</a> wouldn't know which of the two methods to use.
</p><p>Another example is a <span class="nowrap"><span class="monospaced">Print(object o)</span></span> function that executes different actions based on whether it's printing text or photos. The two different functions may be overloaded as <span class="nowrap"><span class="monospaced">Print(text_object T); Print(image_object P)</span>.</span> If we write the overloaded print functions for all objects our program will "print", we never have to worry about the type of the object, and the correct function call again, the call is always: <span class="monospaced">Print(something)</span>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Languages_supporting_overloading">Languages supporting overloading</h2></div>
<p>Languages which support function overloading include, but are not necessarily limited to, the following:
</p>
<ul><li><a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a></li>
<li><a href="Apex_(programming_language)" class="mw-redirect" title="Apex (programming language)">Apex</a></li>
<li><a href="C%2B%2B" title="C++">C++</a></li>
<li><a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a></li>
<li><a href="Clojure" title="Clojure">Clojure</a><sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></li>
<li><a href="D_(programming_language)" title="D (programming language)">D</a></li>
<li><a href="Swift_(programming_language)" title="Swift (programming language)">Swift</a></li>
<li><a href="Fortran" title="Fortran">Fortran</a></li>
<li><a href="Kotlin_(programming_language)" title="Kotlin (programming language)">Kotlin</a><sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Java_(programming_language)" title="Java (programming language)">Java</a><sup id="cite_ref-FOOTNOTEBloch2018238-244§Chapter_8_Item_52:_Eliminate_unchecked_warnings_3-0" class="reference"><a href="#cite_note-FOOTNOTEBloch2018238-244§Chapter_8_Item_52:_Eliminate_unchecked_warnings-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Julia_(programming_language)" title="Julia (programming language)">Julia</a></li>
<li><a href="PostgreSQL" title="PostgreSQL">PostgreSQL</a><sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> and <a href="PL/SQL" title="PL/SQL">PL/SQL</a><sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Scala_(programming_language)" title="Scala (programming language)">Scala</a></li>
<li><a href="TypeScript" title="TypeScript">TypeScript</a></li>
<li><a href="Visual_Basic_(.NET)" title="Visual Basic (.NET)">Visual Basic (.NET)</a></li>
<li><a href="Wolfram_Language" title="Wolfram Language">Wolfram Language</a></li>
<li><a href="Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a></li>
<li><a href="Nim_(programming_language)" title="Nim (programming language)">Nim</a><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Crystal_(programming_language)" title="Crystal (programming language)">Crystal</a><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Delphi_(software)" title="Delphi (software)">Delphi</a><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Python_(programming_language)" title="Python (programming language)">Python</a></li></ul>
<p>Languages that do not support function overloading include <a href="C_(programming_language)" title="C (programming language)">C</a>, <a href="Rust_(programming_language)" title="Rust (programming language)">Rust</a> and <a href="Zig_(programming_language)" title="Zig (programming language)">Zig</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Rules_in_function_overloading">Rules in function overloading</h2></div>
<ul><li>The same function name is used for more than one function definition in a particular module, class or namespace</li>
<li>The functions must have different <a href="Type_signature" title="Type signature">type signatures</a>, i.e. differ in the number or the types of their formal parameters (as in C++) or additionally in their return type (as in Ada).<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup></li></ul>
<p>Function overloading is usually associated with <a href="Statically-typed" class="mw-redirect" title="Statically-typed">statically-typed</a> programming languages that enforce <a href="Type_checking" class="mw-redirect" title="Type checking">type checking</a> in <a href="Function_call" class="mw-redirect" title="Function call">function calls</a>. An overloaded function is a set of different functions that are callable with the same name. For any particular call, the compiler determines which overloaded function to use and resolves this at <a href="Compile_time" title="Compile time">compile time</a>. This is true for programming languages such as Java.<sup id="cite_ref-FOOTNOTEBloch2018238-244§Chapter_8_Item_52:_Use_overloading_judiciously_10-0" class="reference"><a href="#cite_note-FOOTNOTEBloch2018238-244§Chapter_8_Item_52:_Use_overloading_judiciously-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</p><p>Function overloading differs from forms of <a href="Polymorphism_(computer_science)" title="Polymorphism (computer science)">polymorphism</a> where the choice is made at runtime, e.g. through <a href="Virtual_function" title="Virtual function">virtual functions</a>, instead of statically.
</p><p><b>Example: Function overloading in C++</b>
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;iostream&gt;</span>

<span class="kt">int</span><span class="w"> </span><span class="nf">Volume</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">s</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// Volume of a cube.</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">s</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">s</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">s</span><span class="p">;</span>
<span class="p">}</span>

<span class="kt">double</span><span class="w"> </span><span class="nf">Volume</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">r</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">h</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// Volume of a cylinder.</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mf">3.1415926</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">r</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">r</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">static_cast</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="p">(</span><span class="n">h</span><span class="p">);</span>
<span class="p">}</span>

<span class="kt">long</span><span class="w"> </span><span class="nf">Volume</span><span class="p">(</span><span class="kt">long</span><span class="w"> </span><span class="n">l</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">h</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// Volume of a cuboid.</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">l</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="n">h</span><span class="p">;</span>
<span class="p">}</span>

<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">Volume</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">Volume</span><span class="p">(</span><span class="mf">2.5</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">);</span>
<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">Volume</span><span class="p">(</span><span class="mf">100l</span><span class="p">,</span><span class="w"> </span><span class="mi">75</span><span class="p">,</span><span class="w"> </span><span class="mi">15</span><span class="p">);</span>
<span class="p">}</span>
</pre></div>
<p>In the above example, the volume of each component is calculated using one of the three functions named "volume", with selection based on the differing number and type of actual parameters.
</p>
<div class="mw-heading mw-heading2"><h2 id="Constructor_overloading">Constructor overloading</h2></div>
<p><a href="Constructor_(object-oriented_programming)" title="Constructor (object-oriented programming)">Constructors</a>, used to create instances of an object, may also be overloaded in some <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented</a> <a href="Programming_language" title="Programming language">programming languages</a>. Because in many languages the constructor's name is predetermined by the name of the class, it would seem that there can be only one constructor. Whenever multiple constructors are needed, they are to be implemented as overloaded functions. In <a href="C%2B%2B" title="C++">C++</a>, <a href="Default_constructor" title="Default constructor">default constructors</a> take no parameters, instantiating the object <a href="Instance_variable" title="Instance variable">members</a> with their appropriate default values, "which is normally zero for numeral fields and empty string for string fields".<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> For example, a default constructor for a restaurant bill object written in C++ might set the tip to 15%:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="n">Bill</span><span class="p">()</span>
<span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">tip</span><span class="p">(</span><span class="mf">0.15</span><span class="p">),</span><span class="w"> </span><span class="c1">// percentage</span>
<span class="w"> </span><span class="n">total</span><span class="p">(</span><span class="mf">0.0</span><span class="p">)</span>
<span class="p">{</span><span class="w"> </span><span class="p">}</span>
</pre></div>
<p>The drawback to this is that it takes two steps to change the value of the created Bill object. The following shows creation and changing the values within the main program:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="n">Bill</span><span class="w"> </span><span class="n">cafe</span><span class="p">;</span>
<span class="n">cafe</span><span class="p">.</span><span class="n">tip</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">0.10</span><span class="p">;</span>
<span class="n">cafe</span><span class="p">.</span><span class="n">total</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">4.00</span><span class="p">;</span>
</pre></div>
<p>By overloading the constructor, one could pass the tip and total as parameters at creation. This shows the overloaded constructor with two parameters. This overloaded constructor is placed in the class as well as the original constructor we used before. Which one gets used depends on the number of parameters provided when the new Bill object is created (none, or two):
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="n">Bill</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">tip</span><span class="p">,</span><span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">total</span><span class="p">)</span>
<span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">tip</span><span class="p">(</span><span class="n">tip</span><span class="p">),</span>
<span class="w"> </span><span class="n">total</span><span class="p">(</span><span class="n">total</span><span class="p">)</span>
<span class="p">{</span><span class="w"> </span><span class="p">}</span>
</pre></div>
<p>Now a function that creates a new Bill object could pass two values into the constructor and set the data members in one step. The following shows creation and setting the values:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="n">Bill</span><span class="w"> </span><span class="nf">cafe</span><span class="p">(</span><span class="mf">0.10</span><span class="p">,</span><span class="w"> </span><span class="mf">4.00</span><span class="p">);</span>
</pre></div>
<p>This can be useful in increasing program efficiency and reducing code length.
</p><p>Another reason for constructor overloading can be to enforce mandatory data members. In this case the default constructor is declared private or protected (or preferably deleted since <a href="C%2B%2B11" title="C++11">C++11</a>) to make it inaccessible from outside. For the Bill above total might be the only constructor parameter&nbsp;– since a Bill has no sensible default for total&nbsp;– whereas tip defaults to 0.15.
</p>
<div class="mw-heading mw-heading2"><h2 id="Complications">Complications</h2></div>
<p>Two issues interact with and complicate function overloading: <a href="Name_masking" class="mw-redirect" title="Name masking">Name masking</a> (due to <a href="Scope_(computer_science)" title="Scope (computer science)">scope</a>) and <a href="Implicit_type_conversion" class="mw-redirect" title="Implicit type conversion">implicit type conversion</a>.
</p><p>If a function is declared in one scope, and then another function with the same name is declared in an inner scope, there are two natural possible overloading behaviors: the inner declaration masks the outer declaration (regardless of signature), or both the inner declaration and the outer declaration are included in the overload, with the inner declaration masking the outer declaration only if the signature matches. The first is taken in C++: "in C++, there is no overloading across scopes."<sup id="cite_ref-bjarne_faq_12-0" class="reference"><a href="#cite_note-bjarne_faq-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> As a result, to obtain an overload set with functions declared in different scopes, one needs to explicitly import the functions from the outer scope into the inner scope, with the <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">using</code> keyword.
</p><p>Implicit type conversion complicates function overloading because if the types of parameters do not exactly match the signature of one of the overloaded functions, but can match after type conversion, resolution depends on which type conversion is chosen.
</p><p>These can combine in confusing ways: An inexact match declared in an inner scope can mask an exact match declared in an outer scope, for instance.<sup id="cite_ref-bjarne_faq_12-1" class="reference"><a href="#cite_note-bjarne_faq-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>
</p><p>For example, to have a derived class with an overloaded function taking a <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">double</code> or an <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">int</code>, using the function taking an <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">int</code> from the base class, in C++, one would write:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="k">class</span><span class="w"> </span><span class="nc">B</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">public</span><span class="o">:</span>
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="n">F</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="p">);</span>
<span class="p">};</span>

<span class="k">class</span><span class="w"> </span><span class="nc">D</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="n">B</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">public</span><span class="o">:</span>
<span class="w"> </span><span class="k">using</span><span class="w"> </span><span class="n">B</span><span class="o">::</span><span class="n">F</span><span class="p">;</span>
<span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">F</span><span class="p">(</span><span class="kt">double</span><span class="w"> </span><span class="n">d</span><span class="p">);</span>
<span class="p">};</span>
</pre></div>
<p>Failing to include the <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">using</code> results in an <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">int</code> parameter passed to <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">F</code> in the derived class being converted to a double and matching the function in the derived class, rather than in the base class; Including <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" style="" dir="ltr">using</code> results in an overload in the derived class and thus matching the function in the base class.
</p>
<div class="mw-heading mw-heading2"><h2 id="Caveats">Caveats</h2></div>
<p>If a method is designed with an excessive number of overloads, it may be difficult for developers to discern which overload is being called simply by reading the code. This is particularly true if some of the overloaded parameters are of types that are inherited types of other possible parameters (for example "object"). An IDE can perform the overload resolution and display (or navigate to) the correct overload.
</p><p>Type-based overloading can also hamper code maintenance, where code updates can accidentally change which method overload is chosen by the compiler.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Abstraction_(computer_science)" title="Abstraction (computer science)">Abstraction (computer science)</a></li>
<li><a href="Constructor_(computer_science)" class="mw-redirect" title="Constructor (computer science)">Constructor (computer science)</a></li>
<li><a href="Default_argument" title="Default argument">Default argument</a></li>
<li><a href="Dynamic_dispatch" title="Dynamic dispatch">Dynamic dispatch</a></li>
<li><a href="Factory_method_pattern" title="Factory method pattern">Factory method pattern</a></li>
<li><a href="Method_signature" class="mw-redirect" title="Method signature">Method signature</a></li>
<li><a href="Method_overriding" title="Method overriding">Method overriding</a></li>
<li><a href="Object-oriented_programming" title="Object-oriented programming">Object-oriented programming</a></li>
<li><a href="Operator_overloading" title="Operator overloading">Operator overloading</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Citations">Citations</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://clojure.org/guides/learn/functions#_multi_arity_functions">"Clojure - Learn Clojure - Functions"</a>. <i>clojure.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-06-13</span></span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://kotlinlang.org/spec/overload-resolution.html">"Kotlin language specification"</a>. <i>kotlinlang.org</i>.</cite></span>
</li>
<li id="cite_note-FOOTNOTEBloch2018238-244§Chapter_8_Item_52:_Eliminate_unchecked_warnings-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBloch2018238-244§Chapter_8_Item_52:_Eliminate_unchecked_warnings_3-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBloch2018">Bloch 2018</a>, p.&nbsp;238-244, §Chapter 8 Item 52: Eliminate unchecked warnings.</span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.postgresql.org/docs/13/xfunc-overload.html">"37.6. Function Overloading"</a>. <i>PostgreSQL Documentation</i>. 2021-08-12<span class="reference-accessdate">. Retrieved <span class="nowrap">2021-08-29</span></span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/subprograms.htm#i12352">"Database PL/SQL User's Guide and Reference"</a>. <i>docs.oracle.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2021-08-29</span></span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://nim-lang.org/docs/manual.html#overloading-resolution">"Nim Manual"</a>. <i>nim-lang.org</i>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://crystal-lang.org/reference/1.8/syntax_and_semantics/overloading.html">"Crystal Docs"</a>. <i>crystal-lang.org</i>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docwiki.embarcadero.com/RADStudio/Athens/en/Overloading">"Embarcadero Delphi"</a>. <i>embarcadero.com</i>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite id="CITEREFWattFindlay2004" class="citation book cs1">Watt, David A.; Findlay, William (1 May 2004). <i>Programming Language Design Concepts</i>. John Wiley &amp; Sons, Inc. pp.&nbsp;<span class="nowrap">204–</span>207. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-470-85320-7</bdi>.</cite> </span>
</li>
<li id="cite_note-FOOTNOTEBloch2018238-244§Chapter_8_Item_52:_Use_overloading_judiciously-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBloch2018238-244§Chapter_8_Item_52:_Use_overloading_judiciously_10-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBloch2018">Bloch 2018</a>, p.&nbsp;238-244, §Chapter 8 Item 52: Use overloading judiciously.</span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite id="CITEREFChan2017" class="citation book cs1">Chan, Jamie (2017). <i>Learn C# in One Day and Learn It Well</i> (Revised&nbsp;ed.). p.&nbsp;82. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1518800276</bdi>.</cite></span>
</li>
<li id="cite_note-bjarne_faq-12"><span class="mw-cite-backlink">^ <a href="#cite_ref-bjarne_faq_12-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-bjarne_faq_12-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFStroustrup" class="citation web cs1"><a href="Bjarne_Stroustrup" title="Bjarne Stroustrup">Stroustrup, Bjarne</a>. <a rel="nofollow" class="external text" href="http://www.stroustrup.com/bs_faq2.html#overloadderived">"Why doesn't overloading work for derived classes?"</a>.</cite></span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite id="CITEREFBracha2009" class="citation web cs1"><a href="Gilad_Bracha" title="Gilad Bracha">Bracha, Gilad</a> (3 September 2009). <a rel="nofollow" class="external text" href="https://gbracha.blogspot.fr/2009/09/systemic-overload.html">"Systemic Overload"</a>. Room 101.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<ul><li><cite id="CITEREFBloch2018" class="citation book cs1">Bloch, Joshua (2018). <i>"Effective Java: Programming Language Guide"</i> (third&nbsp;ed.). Addison-Wesley. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0134685991</bdi>.</cite></li></ul>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><cite id="CITEREFMeyer2001" class="citation journal cs1"><a href="Bertrand_Meyer" title="Bertrand Meyer">Meyer, Bertrand</a> (October 2001). <a rel="nofollow" class="external text" href="http://se.ethz.ch/~meyer/publications/joop/overloading.pdf">"Overloading vs Object Technology"</a> <span class="cs1-format">(PDF)</span>. Eiffel column. <i>Journal of Object-Oriented Programming</i>. <b>14</b> (4). 101 Communications LLC: <span class="nowrap">3–</span>7<span class="reference-accessdate">. Retrieved <span class="nowrap">27 August</span> 2020</span>.</cite></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-29" href="https://en.wikipedia.org/wiki/?title=Function_overloading&amp;oldid=1303147716">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>